import java.util.ArrayList;
import java.util.Collections;
import java.util.TreeSet;

/**
 * Created by Fly on 2017/6/28.
 */
public class Test1 {

    public static void main(String[] args) {
        Formula formula = new Formula() {
            @Override
            public double calculate(int num) {
                return sqrt(num);
            }
        };
        formula.calculate(2);
        formula.sqrt(2);
        String input = "aavzsdfiosdkfhsdnsdjnfkNAFKJOHNOAFKNERFFSDKFJ";
        new Test1().doString(input);
    }
    public void doString(String input) {
        char[] chars = input.toCharArray();
        ArrayList list = new ArrayList();
        TreeSet set = new TreeSet();
        for (int i = 0; i < chars.length; i++) {
            list.add(String.valueOf(chars[i]));
            set.add(String.valueOf(chars[i]));
        }
        System.out.println(set);
        Collections.sort(list);
        System.out.println(list);
    }
}
